package com.gulimall.product.app;


import com.gulimall.common.core.domain.Result;
import com.gulimall.product.domain.entity.Brand;
import com.gulimall.product.service.IBrandService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.validation.Valid;

/**
 * <p>
 * 品牌 前端控制器
 * </p>
 *
 * @author 坤哥
 * @since 2025-08-25
 */
@Slf4j
@RestController
@RequestMapping("/product/brand")
public class BrandController {
    @Resource
    private IBrandService brandService;

    /**
     * 校验测试
     */
    @PostMapping("/test")
    public Result testValid(@Valid @RequestBody Brand brand /*, BindingResult result*/){
        brandService.save(brand);
        return Result.ok();
    }

}
